package main

import (
	"fmt"
	"time"
)

func main() {

	time1 := make(chan bool, 1)
	time2 := make(chan bool, 1)

	go func() {
		time.Sleep(time.Second * 1)
		time1 <- true
	}()

	select {
		case <- time1:
			fmt.Println("超时了")
		case <- time2:
			fmt.Println("超时了")
	}
}
